package cn.itcast.spring.demo3.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;

import cn.itcast.spring.demo2.dao.AccountDao;
import cn.itcast.spring.demo3.dao.AccountDao2;

@Service
public class AccountServiceImpl2 implements AccountService2 {

	@Autowired
	private AccountDao2 accountDao2;
	
	
	@Override
	public void transferMoney(String from, String to, double money) {
		accountDao2.moneyOut(from,money);
		System.out.println(1/0);
		accountDao2.moneyIn(to,money);
		
	}


}
